package com.github.catvod.spider;

import android.util.Base64;
import com.github.catvod.crawler.Spider;
import com.github.catvod.crawler.SpiderDebug;
import com.github.catvod.parser.C0000;
import com.github.catvod.parser.C0002;
import com.github.catvod.parser.C0003;
import com.github.catvod.parser.C0005;
import com.github.catvod.parser.C0006;
import com.github.catvod.parser.C0007;
import com.github.catvod.parser.C0009;
import com.github.catvod.spider.merge.C0011;
import com.github.catvod.spider.merge.C0013;
import com.github.catvod.spider.merge.C0014;
import com.github.catvod.spider.merge.C0015;
import com.github.catvod.spider.merge.fP;
import com.github.catvod.spider.merge.oe;
import java.io.ByteArrayInputStream;
import java.util.Map;

/* loaded from: classes.dex */
public class Proxy extends Spider {
    public static int h = -1;

    /* renamed from: short, reason: not valid java name */
    private static final short[] f47short = {1718, 1706, 1706, 1710, 1764, 1777, 1777, 1775, 1772, 1769, 1776, 1774, 1776, 1774, 1776, 1775, 1764, 1076, 1131, 1129, 1140, 1123, 1122, 1060, 1151, 1140, 1062, 1144, 1136, 460, 456, 447, 406, 396, 407, 413, 473, 405, 406, 410, 408, 405, 473, 394, 412, 395, 399, 412, 395, 473, 393, 406, 395, 397, 473, 2255, 2259, 2259, 2263, 2205, 2184, 2184, 2198, 2197, 2192, 2185, 2199, 2185, 2199, 2185, 2198, 2205, 2149, 2106, 2104, 2085, 2098, 2099, 2409, 2402, 2764, 2761, 2774, 2757, 2021, 2020, 2038, 1949, 1928, 2306, 2319, 2310, 2323, 2973, 2961, 2973, 2310, 2331, 2327, 3311, 3303, 798, 783, 786, 798, 837, 794, 774, 779, 771, 772, 849, 842, 777, 770, 779, 792, 793, 783, 798, 855, 799, 798, 780, 839, 850, 2955, 2959, 1488, 1493, 1491, 1480, 1841, 1832, 1825, 1826, 1826, 2313, 2318, 2320, 1085, 1085, 1067, 1074};

    public Proxy() {
        int m0 = C0000.m0();
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = m0 >= 0 ? 1709 : 1678;
                case 204:
                    System.out.println(Float.valueOf(C0007.m25("uMU46d4fJ")));
                    break;
                case 239:
                    break;
            }
            return;
        }
    }

    static void h() {
        int i = h;
        int i2 = 1616;
        while (true) {
            i2 ^= 1633;
            switch (i2) {
                case 14:
                case 49:
                    i2 = i > 0 ? 1709 : 1678;
                case 204:
                    break;
                case 239:
                    int i3 = 9978;
                    while (true) {
                        int i4 = 1740;
                        while (true) {
                            i4 ^= 1757;
                            switch (i4) {
                                case 17:
                                    i4 = i3 < 10000 ? 1833 : 1802;
                                case 54:
                                case 471:
                                    break;
                                case 500:
                                    boolean equals = fP.oq(C0018.m56(f47short, 0, 17, 1758) + i3 + C0017.m52(f47short, 17, 12, 1051), null).equals(C0006.m18(f47short, 29, 2, 419));
                                    int i5 = 1864;
                                    while (true) {
                                        i5 ^= 1881;
                                        switch (i5) {
                                            case 17:
                                                i5 = equals ? 48736 : 48705;
                                            case 47384:
                                                i3++;
                                                int i6 = 48891;
                                                while (true) {
                                                    i6 ^= 48908;
                                                    switch (i6) {
                                                        case 22:
                                                            break;
                                                        case 503:
                                                            i6 = 48922;
                                                            break;
                                                    }
                                                }
                                                break;
                                            case 47417:
                                                SpiderDebug.log(C0014.m43(f47short, 31, 24, 505) + i3);
                                                h = i3;
                                                int i7 = 48767;
                                                while (true) {
                                                    i7 ^= 48784;
                                                    switch (i7) {
                                                        case 14:
                                                            break;
                                                        case 239:
                                                            i7 = 48798;
                                                            continue;
                                                    }
                                                }
                                                break;
                                            case 47483:
                                        }
                                    }
                                    break;
                            }
                        }
                    }
                    int m39 = C0013.m39();
                    int i8 = 49666;
                    while (true) {
                        i8 ^= 49683;
                        switch (i8) {
                            case 17:
                                i8 = m39 >= 0 ? 49759 : 49728;
                            case 50:
                            case 76:
                                System.out.println(Long.valueOf(C0015.m46("6k4")));
                                break;
                            case 83:
                                break;
                        }
                    }
                    break;
            }
            return;
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:36:0x005c, code lost:
    
        return r2;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static java.lang.String localProxyUrl() {
        /*
            r2 = 0
            r1 = 0
            java.lang.String r0 = "ۣۤ۟"
            r3 = r2
            r4 = r2
        L6:
            int r0 = com.github.catvod.parser.C0006.m20(r0)
            switch(r0) {
                case 56321: goto L1a;
                case 1746847: goto L30;
                case 1747680: goto L5c;
                case 1749826: goto L37;
                case 1750633: goto L1f;
                case 1750686: goto L25;
                case 1750726: goto L45;
                case 1752462: goto L2b;
                case 1754531: goto L3f;
                case 1754660: goto L56;
                case 1755623: goto L51;
                default: goto Ld;
            }
        Ld:
            r0 = 55
            r2 = 17
            r5 = 2215(0x8a7, float:3.104E-42)
            java.lang.String r2 = com.github.catvod.spider.merge.C0013.m41(r3, r0, r2, r5)
            java.lang.String r0 = "ۣۢۨ"
            goto L6
        L1a:
            int r1 = com.github.catvod.spider.Proxy.h
            java.lang.String r0 = "ۧۨۥ"
            goto L6
        L1f:
            r4.append(r2)
            java.lang.String r0 = "۠ۡ"
            goto L6
        L25:
            h()
            java.lang.String r0 = "ۢۧۧ"
            goto L6
        L2b:
            short[] r3 = com.github.catvod.spider.Proxy.f47short
            java.lang.String r0 = "ۣۥۨ"
            goto L6
        L30:
            java.lang.String r2 = r4.toString()
            java.lang.String r0 = "۠۠۠"
            goto L6
        L37:
            java.lang.StringBuilder r4 = new java.lang.StringBuilder
            r4.<init>()
            java.lang.String r0 = "ۨۨۧ"
            goto L6
        L3f:
            r4.append(r2)
            java.lang.String r0 = "۟ۤۤ"
            goto L6
        L45:
            r0 = 72
            r2 = 6
            r5 = 2122(0x84a, float:2.974E-42)
            java.lang.String r2 = com.github.catvod.parser.C0004.m12(r3, r0, r2, r5)
            java.lang.String r0 = "ۧۤ۠"
            goto L6
        L51:
            short[] r3 = com.github.catvod.spider.Proxy.f47short
            java.lang.String r0 = "ۣۨ۠"
            goto L6
        L56:
            r4.append(r1)
            java.lang.String r0 = "ۥ۟ۨ"
            goto L6
        L5c:
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Proxy.localProxyUrl():java.lang.String");
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:20:0x0060. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:45:0x00a0. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x0030. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:78:0x0139. Please report as an issue. */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:22:0x00ed -> B:18:0x008c). Please report as a decompilation issue!!! */
    public static Object[] proxy(Map<String, String> map) {
        Object[] objArr;
        try {
            String str = map.get(C0017.m52(f47short, 78, 2, 2317));
            boolean equals = str.equals(C0006.m18(f47short, 80, 4, 2720));
            String m18 = C0006.m18(f47short, 84, 5, 1968);
            int i = 1616;
            while (true) {
                i ^= 1633;
                switch (i) {
                    case 14:
                    case 49:
                        i = equals ? 1709 : 1678;
                    case 204:
                        boolean equals2 = map.get(C0002.m6(f47short, 89, 4, 2422)).equals(C0009.m30(f47short, 93, 3, 3049));
                        int i2 = 1740;
                        while (true) {
                            i2 ^= 1757;
                            switch (i2) {
                                case 17:
                                    i2 = equals2 ? 1833 : 1802;
                                case 54:
                                case 471:
                                    break;
                                case 500:
                                    objArr = oe.V0(new String(Base64.decode(map.get(C0011.m35(f47short, 96, 3, 2403)), 10), m18));
                                    break;
                            }
                        }
                        break;
                    case 239:
                        boolean equals3 = str.equals(C0005.m17(f47short, 99, 2, 3212));
                        int i3 = 1864;
                        while (true) {
                            i3 ^= 1881;
                            switch (i3) {
                                case 17:
                                    i3 = equals3 ? 48736 : 48705;
                                case 47384:
                                    boolean equals4 = str.equals(C0011.m35(f47short, 128, 4, 1440));
                                    int i4 = 48767;
                                    while (true) {
                                        i4 ^= 48784;
                                        switch (i4) {
                                            case 14:
                                                break;
                                            case 45:
                                                boolean equals5 = str.equals(C0009.m30(f47short, 132, 5, 1874));
                                                String m9 = C0003.m9(f47short, 137, 3, 2428);
                                                int i5 = 48891;
                                                while (true) {
                                                    i5 ^= 48908;
                                                    switch (i5) {
                                                        case 22:
                                                        case 53:
                                                            boolean equals6 = str.equals(C0003.m9(f47short, 140, 4, 1113));
                                                            int i6 = 49666;
                                                            while (true) {
                                                                i6 ^= 49683;
                                                                switch (i6) {
                                                                    case 17:
                                                                        if (!equals6) {
                                                                            break;
                                                                        } else {
                                                                            i6 = 49759;
                                                                        }
                                                                    case 50:
                                                                        break;
                                                                    case 76:
                                                                        objArr = Ddrk.loadsub(map.get(m9));
                                                                        break;
                                                                    case 83:
                                                                        break;
                                                                    default:
                                                                        continue;
                                                                }
                                                                i6 = 49728;
                                                            }
                                                        case 503:
                                                            i5 = equals5 ? 49635 : 48953;
                                                        case 32495:
                                                            objArr = Ddrk.loadsub(map.get(m9));
                                                            break;
                                                    }
                                                }
                                                break;
                                            case 76:
                                                objArr = PushAgent.vod(map);
                                                break;
                                            case 239:
                                                if (!equals4) {
                                                    break;
                                                } else {
                                                    i4 = 48860;
                                                }
                                            default:
                                                continue;
                                        }
                                        i4 = 48829;
                                    }
                                    break;
                                case 47417:
                                    objArr = new Object[]{200, C0015.m47(f47short, 101, 25, 874), new ByteArrayInputStream(C0013.m41(f47short, 126, 2, 3044).getBytes(m18))};
                                    break;
                                case 47483:
                            }
                        }
                        break;
                }
            }
        } catch (Throwable th) {
            int i7 = 49790;
            while (true) {
                i7 ^= 49807;
                switch (i7) {
                    case 18:
                        break;
                    case 241:
                        i7 = 49821;
                        continue;
                    default:
                        continue;
                }
            }
        }
        objArr = null;
        return objArr;
    }
}
